package day03;

public class Sum {
	public static void main(String[] args) {
		double sum = 0.0;
		int f = 1;// 代表当前项的符号
		for (int i = 1; i <= 50; i++) {
			double d = 1.0 / (2 * i - 1);
			sum = sum + f * d;
			f = -f;
		}
		System.out.println("他们的值是：" + sum);
	}
}
// 还有求出绝对值最大的1e-5之前的值